<?php

    class logs_model extends CI_Model {
        
        public function addLog($person_id, $action) { 
            //$query = $this->db->query("INSERT INTO logs SET person_id='" . $person_id . "', action='" . $action . "'");
            $this->db->set('person_id', $person_id);
            $this->db->set('action', $action);
            $this->db->insert('logs');
        }
        
        public function getAll() { 
            $query = $this->db->get('logs');
            return $query->result_array();
        }

    }
    
?>
